# from flask import Flask,request
#
# app = Flask(__name__)
#
# @app.route("/")
# def index():
#     return "hello, world"
#
# @app.route("/test/<number>")
# def test(number):
#     print("i get number",number)
#     print(f"get number:{number}")
#     return "test"
#
# @app.route("/page/<p_num>/<p_line>")
# def page(p_num,p_line):
#     lst=[
#         "第1个数据","第2个数据","第3个数据","第4个数据","第5个数据",
#         "第6个数据","第7个数据","第8个数据","第9个数据","第10个数据"
#     ]
#     start = (int(p_num) -1 ) * int(p_line)
#     end = start + int(p_line)
#     return "\n".join(lst[start:end])
#
# @app.route("/login")
# def login():
#
#     print(request.form)
#     print(request.form.get("name"))
#     print(request.headers)
#     return "login"
#
# user_dict = {}
# @app.route("/register")
# def register():
#     user = request.json.get("user")
#     passwd = request.json.get("passwd")
#     re_pass = request.json.get("re_passwd")
#     if not (user and passwd and re_pass):
#         return "参数传递不完整"
#     if passwd != re_pass:
#         return "注册失败，密码不一致"
#     if user in user_dict:
#         return "注册失败，用户名已经注册"
#     user_dict[user] = passwd
#     print(f"user_dict is {user_dict}")
#     return "注册成功!"
#
# app.run(debug=True)
#


# flask --app manager:app shell

